<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>$课堂练习$</title>
</head>
<body>
<script>
    /*
    * var arr=[10,20,30,40,50];
    * console.log(arr[0])
    * console.log(arr[1])
    * console.log(arr[2])
    * console.log(arr[3])
    * console.log(arr[4])
    *
    *
    *
    * */
    //遍历数组
    var arr = [10, 20, 30, 40, 50];
    for (var i = 0; i < arr.length; i++) {
        console.log(arr[arr.length - 1 - i]);
    }
    var arr = [10, 20, 30, 40, 50];
    for (var i = 0; i < arr.length; i++) {
        console.log(arr[i]);
    }
</script>
</body>
</html>